package com.java.frontweb.controller;

import com.java.base.service.HttpAPIService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @ClassName HttpClientController
 * @Description 连接控制层
 * @Author Trigger Wu
 * @Date 2018/9/1319:05
 * @Version 1.0
 **/

@RestController
public class HttpClientController {
    @Resource
    private HttpAPIService httpAPIService;

    @RequestMapping("httpclient")
    public String test() throws Exception {
        String str = httpAPIService.doGet("http://www.baidu.com");
        System.out.println(str);
        return "hello";
    }

}
